<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>92Play后台管理</title>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/managercss.css" />
<style type="text/css">
<!--
body {
	margin-left: 5px;
	margin-top: 5px;
	margin-right: 5px;
	background:#EFEFEF;
}
-->
</style>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.4.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.form.js"></script>
<script type="text/javascript">
$(function(){
	$("#update").click(function(){
		var companyName = $("#companyName").val();
		if(companyName==''){
			alert("请输入厂商名称!");
			$("#companyName").focus();
			return;
		}else{
			var date = $("#companyForm").formSerialize();
			$.ajax({
				url:"<%=request.getContextPath() %>/admin/adminUser/modify",
				data:date,
				type:"POST",
				dataType: "text",
				success:function(flag){
					if(flag=='1'){
						alert("修改成功!");
						//window.location.href= "<%=request.getContextPath() %>/admin/company";
						 parent.location.reload();
					}else{
						alert("修改失败!");
					}
				}
			});
			return;
		}
	});
});
</script>
</head>
<body>
<div class="information">
	<div class="list">
		<form method="post" id="companyForm">
		<div class="noselect">
			<input type="hidden" name="id" id="id" value="${bean.id }">
			<input type="hidden" name="power" id="power" value="${bean.power }">
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">CP名称：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="cpname" id="cpname" size="20" value="${bean.cpname }">
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">CP简介：</li>
				<li style="width: 300px;text-align: left;">
					<textarea rows="5" cols="30" name="cpmemo" id="cpmemo">${bean.cpmemo }</textarea>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">业务线：</li>
				<li style="width: 300px;text-align: left;">
					<select name="bussiness">
						<c:if test="${bean.bussiness == 'SMS'}">
						<option value="SMS" selected="selected">SMS</option>
						</c:if>
						<c:if test="${bean.bussiness != 'SMS'}">
						<option value="SMS">SMS</option>
						</c:if>
						
						<c:if test="${bean.bussiness == 'MMS'}">
						<option value="MMS" selected="selected">MMS</option>
						</c:if>
						<c:if test="${bean.bussiness != 'MMS'}">
						<option value="MMS">MMS</option>
						</c:if>
						
						<c:if test="${bean.bussiness == 'IVR'}">
						<option value="IVR" selected="selected">IVR</option>
						</c:if>
						<c:if test="${bean.bussiness != 'IVR'}">
						<option value="IVR">IVR</option>
						</c:if>
						
						<c:if test="${bean.bussiness == '视频基地'}">
						<option value="视频基地" selected="selected">视频基地</option>
						</c:if>
						<c:if test="${bean.bussiness != '视频基地'}">
						<option value="视频基地">视频基地</option>
						</c:if>
						<c:if test="${bean.bussiness == '百宝箱游戏'}">
						<option value="百宝箱游戏" selected="selected">百宝箱游戏</option>
						</c:if>
						<c:if test="${bean.bussiness != '百宝箱游戏'}">
						<option value="百宝箱游戏">百宝箱游戏</option>
						</c:if>
						
						<c:if test="${bean.bussiness == 'G+游戏'}">
						<option value="G+游戏" selected="selected">G+游戏</option>
						</c:if>
						<c:if test="${bean.bussiness != 'G+游戏'}">
						<option value="G+游戏">G+游戏</option>
						</c:if>
						<c:if test="${bean.bussiness == '动漫基地'}">
						<option value="动漫基地" selected="selected">动漫基地</option>
						</c:if>
						<c:if test="${bean.bussiness != '动漫基地'}">
						<option value="动漫基地">动漫基地</option>
						</c:if>
						
						<c:if test="${bean.bussiness == '阅读基地'}">
						<option value="阅读基地" selected="selected">阅读基地</option>
						</c:if>
						<c:if test="${bean.bussiness != '阅读基地'}">
						<option value="阅读基地">阅读基地</option>
						</c:if>
						
						<c:if test="${bean.bussiness == 'MM基地'}">
						<option value="MM基地" selected="selected">MM基地</option>
						</c:if>
						<c:if test="${bean.bussiness != 'MM基地'}">
						<option value="MM基地">MM基地</option>
						</c:if>
						<c:if test="${bean.bussiness == 'MDO业务'}">
						<option value="MDO业务" selected="selected">MDO业务</option>
						</c:if>
						<c:if test="${bean.bussiness != 'MDO业务'}">
						<option value="MMDO业务">MDO业务</option>
						</c:if>
					</select>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">分成比率：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="cpercent" id="cpercent" value="${bean.cpercent}">
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">结算周期：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="cpcheck" id="cpcheck" value="${bean.cpcheck}">
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">扣量比率：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="cppercent" id="cppercent" size="20" value="${bean.cppercent}">%
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">合作SP渠道：</li>
				<li style="width: 300px;text-align: left;">
					<textarea rows="5" cols="30" name="spchannel" id="spchannel">${bean.spchannel }</textarea>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">合作状态：</li>
				<li style="width: 300px;text-align: left;">
					<select name="cpstatus">
						<c:if test="${bean.cpstatus == 1}">
							<option value="1">有效</option>
							<option value="0">无效</option>
						</c:if>
						<c:if test="${bean.cpstatus == 0}">
							<option value="0">无效</option>
							<option value="1">有效</option>
						</c:if>
					</select>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">上行同步地址：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="mourl" id="mourl" value="${bean.mourl }">
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">下行同步地址：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="mturl" id="mturl" value="${bean.mturl }">
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">&nbsp;</li>
				<li style="width: 300px;text-align: left;">
					<input type="button" id="update" value="修改" /> 
				</li>
			</ul>
			<div class="clear"></div>
		</div>
		</form>
	</div>
</div>
</body>
</html>